package com.realgodo.site.web.user.interduce;

import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import org.springframework.context.annotation.Scope;

import com.realgodo.site.web.user.UserDefaultController;

@Scope("prototype")
@Results( { @Result(name = "toindex", type = "redirect", location = "${base}/user/") })
public class IndexController extends UserDefaultController {

	private static final long serialVersionUID = 6391044332150172873L;

	private String interduce;

	public String execute() throws Exception {
		return SUCCESS;
	}

	public String save() throws Exception {
		spaceManager.saveInterduce(getInterduce(), super.getSpace().getId());
		return "toindex";
	}

	public String getInterduce() {
		return interduce;
	}

	public void setInterduce(String interduce) {
		this.interduce = interduce;
	}

}
